import java.util.Scanner;

public class Example1 {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		System.out.println("请输入5个数字");
		int[] num = new int[5];
		for( int i=0; i<5; i++) {
			num[i] = sc.nextInt();
		}
		System.out.println("请输入要查找的数字");
		int iNum = sc.nextInt();
		sc.close();
		int index = findNum(num, iNum);
		if(index>0)
			System.out.println("要查找的数字"+iNum+"在数组中的位置是"+(index+1)+"位置");
		else
			System.out.println("要查找的数字"+iNum+"在数组中不存在");
		}
	public static int findNum(int[] arrayNum, int fNum) {
		for(int i=0; i<arrayNum.length; i++) {
			if(arrayNum[i] == fNum) {
				return i;
			}
		}
		return -1;
	}

}
